package com.woniu.Service;

import com.github.pagehelper.PageInfo;
import com.woniu.entity.FlowerType;
import com.woniu.vo.FlowerTypeVo;

/**
 * @Author: Gwj
 * @Date: 2024/7/8 14:51
 */
public interface FlowerTypeService {
    //分页查询 鲜花分类
    PageInfo<FlowerTypeVo> findAllFlowerTypes(int pageNum, int pageSize) throws Exception;

    // 条件查询 并且分页
    PageInfo<FlowerTypeVo> findFlowerTypesByConditions(FlowerTypeVo flowerTypeVo, int pageNum, int pageSize) throws Exception;

    //删除鲜花分类，逻辑删除
    int changeFlowerTypeIsDeleted(FlowerType flowerType) throws Exception;

    // 新增鲜花分类
    int addFlowerType(FlowerType flowerType) throws Exception;

    // 修改鲜花分类
    int updateFlowerTypeInfoById(FlowerType flowerType) throws Exception;

    // 禁用鲜花分类，把isdelete字段改为2
    int disableFlowerType(FlowerType flowerType) throws Exception;

    //新增时的重名验证
    FlowerType checkFlowerTypeName(String flowerTypeName) throws Exception;

    //修改时的重名验证、
    FlowerType selectFlowerTypeNameAndId(String typeName, Integer typeId) throws Exception;
}
